home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Controls
/
Visual Basic Controls.iso
/
vbcontrol
/
t2win-32
/
_ras.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1998-07-13
|
5KB
|
140 lines
VERSION 5.00
Begin VB.Form frmRas
BorderStyle = 4 'Fixed ToolWindow
Caption = "Remote Access Service"
ClientHeight = 4845
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 7485
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 4845
ScaleWidth = 7485
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 570
Left = 0
TabIndex = 1
Top = -90
Width = 7485
Begin VB.CommandButton cmdNP
Caption = ">"
Height = 285
Index = 1
Left = 7110
TabIndex = 6
Top = 195
Width = 285
End
Begin VB.CommandButton cmdNP
Caption = "<"
Height = 285
Index = 0
Left = 6210
TabIndex = 5
Top = 195
Width = 285
End
Begin VB.CommandButton Command1
Caption = "&Go"
Default = -1 'True
Height = 285
Left = 6570
TabIndex = 4
Top = 195
Width = 465
End
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 2
Top = 180
Width = 4755
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 3
Top = 210
Width = 1275
End
End
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 4110
Left = 105
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 630
Width = 7260
End
Attribute VB_Name = "frmRas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 25
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
txt_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestRasGetCountryInfo
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_ras.t2w")
IsLoaded = True
End Sub
Private Sub Command1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestRasGetCountryInfo()
Dim intResult As Integer
Dim strDisplay As String
Dim i As Integer
strDisplay = ""
Dim CI As tagCOUNTRYINFO
intResult = cRasGetCountryInfo(0, CI, True)
strDisplay = strDisplay & "Code" & vbTab & "ID" & vbTab & "Name" & vbCrLf & vbCrLf
Do While (intResult = RAS_SUCCESS)
strDisplay = strDisplay & CI.iCountryCode & vbTab & CI.iCountryID & vbTab & CI.sCountryName & vbCrLf
intResult = cRasGetCountryInfo(0, CI, False)
Loop
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
intResult = cRasGetCountryInfo(0, CI, True)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub